﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using WpfApp1.Models;

namespace WpfApp1.Views.Pages
{
    /// <summary>
    /// EditPage.xaml 的交互逻辑
    /// </summary>
    public partial class EditPage : Page
    {
        public EditPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //CodesDataGrid.CommitEdit(DataGridEditingUnit.Row, true);
            //// all changes are automatically tracked, including
            //// deletes!
            //cc.SaveChanges();
            //CodesTreeViewSource.Source = Mm.CodeNodes?.GetTrees();
            //// this forces the grid to refresh to latest values
            //TV.Items.Refresh();
            //CodesDataGrid.Items.Refresh();
        }

        private void TV_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            //Mm.SelectedCode = (Code)e.NewValue;
            //textEditor.Text = CC.SelectedCode.Code.代码文本;
        }

        private void TV_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
        }
    }
}